scicms-core:
  data:
    default-pool-size: 5
    default-idle: 1
    default-limit: 20
    max-limit: 1000
    data-loader-chunk-size: 1000
    datasource-cache-expiration-minutes: 720
    item-query-result-entry-ttl-minutes: 10
    item-query-result-max-entries: 50
    dataset-query-result-entry-ttl-minutes: 5
    dataset-query-result-max-entries: 50
    max-cached-records-size: 200
    trim-strings: true
  i18n:
    default-locale: en-US
  media:
    provider: ${MEDIA_PROVIDER:local}
    provider-options:
      local:
        base-path: ${MEDIA_LOCAL_PATH}
        create-directories: true
      s3:
        endpoint: ${S3_ENDPOINT:http://127.0.0.1:9000}
        access-key: ${S3_ACCESS_KEY:minioadmin}
        secret-key: ${S3_SECRET_KEY:minioadmin}
        default-bucket: ${S3_DEFAULT_BUCKET:scicms}
  schema:
    path: build/resources/main/schema
    use-file-checksum: false
    seed-on-init: true
    clear-cache-on-seed: false
    delete-if-absent: false
    rebuild-unique-attribute-indexes: true
    lock-duration-seconds: 300
  security:
    jwt-token:
      id: scisolutionsJWT
      secret: scisolutionsSecretKey
      expiration-interval-millis: 86_400_000
    registration-disabled: false
    password-pattern: '^\w{6,16}$'
    clear-access-on-user-delete: false

dgs:
  graphql:
    schema-locations: classpath*:graphql/**/*.graphql*
    dataloader.ticker-mode-enabled: true

server:
  error.include-stacktrace: on_param
  port: 8079

spring:
  cache:
    type: redis
  data:
    redis:
      host: ${REDIS_HOST:127.0.0.1}
      port: ${REDIS_PORT:6379}
  datasource:
    driver-class-name: oracle.jdbc.OracleDriver
    url: jdbc:oracle:thin:@//localhost:1521/xepdb1
    username: scicms
    password: scicms
    hikari:
      maximum-pool-size: 5
      minimum-idle: 1
  jpa:
    open-in-view: false
    properties:
      hibernate:
        cache:
          use_second_level_cache: true
          use_query_cache: true
          use_minimal_puts: true
          use_structured_entries: true
          region.factory_class: org.redisson.hibernate.RedissonRegionFactory
          redisson:
            fallback: true
            config: redisson.yml
            default-query-results-region.expiration.time_to_live: 600_000
            ru.scisolutions.scicmscore.persistence.entity:
              Access.expiration.time_to_live: 600_000
              AllowedLifecycle.expiration.time_to_live: 600_000
              AllowedPermission.expiration.time_to_live: 600_000
              Datasource.expiration.time_to_live: 600_000
              Item.expiration.time_to_live: 1_800_000
              ItemTemplate.expiration.time_to_live: 1_800_000
              Lifecycle.expiration.time_to_live: 600_000
              Permission.expiration.time_to_live: 600_000
              RevisionPolicy.expiration.time_to_live: 600_000
              User.expiration.time_to_live: 600_000
#        generate_statistics: true
  liquibase:
    change-log: classpath:/db/changelog/db.changelog-master.xml
  mail:
    host: ''
    port: 25
    username: ''
    password: ''

logging:
  file.name: logs/scicms-core.log
  logback.rollingpolicy.max-history: 7
  level:
    org.hibernate.SQL: debug
    org.hibernate.type.descriptor.sql.BasicBinder: trace
#    org.springframework.jdbc.core.JdbcTemplate: debug
#    org.springframework.jdbc.core.StatementCreatorUtils: trace
#    org.springframework.security: debug
#    org.springframework.web: debug
    ru.scisolutions:
      scicmscore: debug
      scicmscore.engine.dao: trace
